if SERVER then
	registerCommand("sethealth", "Sets the amount of health you specify to the player you designate - defaults to yourself if you leave out the player - player comes before value", function(param)
		local healthSet = "caller set target's health to amount"
		local healthKill = "caller set target's health a bit low"
		if param["settings"]["sethealth_msg"] then
			healthSet = param["settings"]["sethealth_msg"]
		end
		if param["settings"]["sethealth_kill_msg"] then
			healthKill = param["settings"]["sethealth_kill_msg"]
		end
		local healthTable = {}
		healthTable["caller"] = getCaller(param[1])
		if param[3] != nil && param[3] != "" then
			local targs = string.Explode(" ", param[3])
			local amount = tonumber(table.remove(targs, table.Count(targs)))
			if not amount then
				return nil
			end
			if table.Count(targs) >= 1 then
				for i, targ in pairs(targs) do
					local plyTarg = getPlayerByName(targ)
					if plyTarg then
						healthTable["target"] = plyTarg:GetName()
						local plyamount = amount
						if plyamount > 99999 then
							plyamount = 99999
						end
						if plyamount <= 0 then
							plyTarg:Kill()
							display(param[1], "sethealth", { plyTarg } , parseDisplayMessage(healthKill, healthTable))
							return nil
						end
						healthTable["amount"] = plyamount
						
						display(param[1], "sethealth", { plyTarg } , parseDisplayMessage(healthSet, healthTable))
						plyTarg:SetHealth(plyamount)
					end
				end
			else
				if not param[1]:IsValid() then
					return nil
				end
				healthTable["target"] = param[1]:GetName()
				if amount > 99999 then
					amount = 99999
				end
				if amount <= 0 then
					param[1]:Kill()
					display(param[1], "sethealth", { nil } , parseDisplayMessage(healthKill, healthTable))
					return nil
				end
				healthTable["amount"] = amount
				
				display(param[1], "sethealth", { nil } , parseDisplayMessage(healthSet, healthTable))
				param[1]:SetHealth(amount)
			end
		end
	end)
end